package test01;

import com.le.t1.person;

import java.io.IOException;
import java.io.ObjectOutputStream;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;

public class c {
    public static void main(String[] args) throws IOException {

        InetAddress serverIP = InetAddress.getByName("127.0.0.1");
        Socket socket=new Socket("localhost",8888);


        ObjectOutputStream op=new ObjectOutputStream(socket.getOutputStream());

        person person1=new person("123","123" );
        op.writeObject(person1);



        op.close();
        socket.close();


    }
}
